package tipppane;

import java.awt.Component;

import javax.swing.DefaultListCellRenderer;
import javax.swing.JLabel;
import javax.swing.JList;

public class MyCellRenderer extends DefaultListCellRenderer {

	private static final long serialVersionUID = -1480872044670666816L;

	@Override
	public Component getListCellRendererComponent(JList list, Object value,
			int index, boolean isSelected, boolean cellHasFocus) {
		JLabel jLabel = (JLabel) super.getListCellRendererComponent(list,
				value, index, isSelected, cellHasFocus);
		jLabel.setText(value.toString());  
		if(index == 0) {  
            setFocusable(false);  
            setEnabled(false);  
        } 
		return jLabel;
	}
}
